Skip to content

Conversation

@nafiurahman00
Copy link

@nafiurahman00 nafiurahman00 commented Sep 17, 2025

The original extractor.py in the deepbrain package was using the TensorFlow 1.x API by creating a session with:

self.sess = tf.Session(graph=graph)

This caused the following error when running with TensorFlow 2.x:

AttributeError: module 'tensorflow' has no attribute 'Session'

I updated the code to be TensorFlow 2.x compatible by enabling TF1 compatibility mode and replacing all tf.Session usages with tf.compat.v1.Session.
Additionally, I disabled eager execution using tf.compat.v1.disable_eager_execution() to allow loading and running the frozen graph as originally intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant